function util = u(c,s,infi,mar)

posc = (c>=mar);
negc = (c<mar);

cc = c.*posc+negc;

util = exp((1-s)*log(cc))/(1-s)-negc*infi;
